import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('../page/index')
  },
  {
    path: '/plane',
    name: 'Plane',
    component: () => import('../page/plane')
  },
  {
    path: '/post',
    name: 'Post',
    component: () => import('../page/post')
  },
  {
    path: '/user',
    name: 'User',
    component: () => import('../page/users')
  },
  {
    path: '/hotel',
    name: 'Hotel',
    component: () => import('../page/hotel')
  },
  {
    path: '/hotel/hotelDetail',
    name: 'HotelDetail',
    component: () => import('../page/hotel/hotelDetail')
  },
  {
    path: '/plane/flight',
    name: 'flight',
    component: () => import('../page/plane/flight')
  },
  {
    path: '/plane/order',
    name: 'order',
    component: () => import('../page/plane/order')
  },
  {
    path: '/plane/pay',
    name: 'pay',
    component: () => import('../page/plane/pay')
  },
  {
    path: '/post/details',
    name: 'details',
    component: () => import('../page/post/details')
  },
  {
    path: '/post/write',
    name: 'write',
    component: () => import('../page/post/write')
  }
]

const router = new VueRouter({
  routes
})

export default router
